package com.github.why168.linkedlist;

import java.util.Stack;

/**
 * @author Edwin.Wu edwin.wu05@gmail.com
 * @version 2019/10/27 2:39 下午
 * @since JDK1.8
 */
public class TestStack {

    public static void main(String[] args) {
        Stack<String> stack = new Stack<>();
        stack.add("jack");
        stack.add("tom");
        stack.add("smith");


        while (stack.size() > 0) {
            System.out.println(stack.pop());
        }
    }
}
